package com.zc.initConstructor;

import com.zc.study.designPattern.创建型设计模式.singletonPattern.Example;
import com.zc.study.pay.MD5Util;

import java.util.ArrayList;
import java.util.List;

/**
 * 全局变量或常量
 */
public class GlobalData {
    //单例思考的example创建的个数
    public static int  example= 1;
    //examole连接池
    public static List<Example> exampleList = new ArrayList<>();
    //账号生成密码的左盐
    public  static final String LEFT_SALT = "IHATELANMEI";
    //账号生成密码右盐
    public static final String RIGHT_SALT = "ILOSEMYLOVE!@#";

    public static String decoratePassword(String password){
        //对密码进行加工
        String decorate = LEFT_SALT+password+RIGHT_SALT;
        //进行md5加密
        String aa = MD5Util.MD5Encode(decorate,"UTF8");
        return aa;
    }


}
